package model

import (
	"gorm.io/gorm"
	"time"
)

type GroupComment struct {
	Id        uint64         `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	UserId    uint64         `gorm:"column:user_id;type:bigint UNSIGNED;not null;" json:"user_id"`
	ToUserId  uint64         `gorm:"column:to_user_id;type:bigint UNSIGNED;not null;" json:"to_user_id"`
	GroupId   uint64         `gorm:"column:group_id;type:bigint UNSIGNED;not null;" json:"group_id"`
	Comment   string         `gorm:"column:comment;type:varchar(255);not null;" json:"comment"`
	Type      uint64         `gorm:"column:type;type:bigint UNSIGNED;comment:状态 1 -文本 2 -图片 3 - 文件;not null;default:1;" json:"type"` // 状态 1 -文本 2 -图片 3 - 文件
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}
